home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-06-28 | 646 b | 35 lines | [TEXT/CWIE] |
- // ProcessLoop.h
-
- #ifndef ProcessLoop_h
- #define ProcessLoop_h
-
- #ifndef Process_h
- #include "Process.h"
- #endif
- #ifndef Assert_h
- #include "Assert.h"
- #endif
-
- class ProcessLoop
- {
- private:
- Process process;
- bool finished;
-
- static const ProcessSerialNumber noProcess;
-
- public:
- ProcessLoop();
-
- bool Finished() const { return finished; }
- bool Unfinished() const { return !finished; }
-
- void operator++();
- void operator++( int ) { operator++(); }
-
- const Process& operator*() const { Assert( !finished ); return process; }
- const Process *operator->() const { Assert( !finished ); return &process; }
- };
-
- #endif
-